package com.pangsir.bookstore.dao.impl;

import com.pangsir.bookstore.dao.OrderDao;
import com.pangsir.bookstore.pojo.Order;
import com.pangsir.myssm.basedao.BaseDAO;

public class OrderDaoImpl extends BaseDAO<Order> implements OrderDao {


    @Override
    public void addOrder(Order order) {
        String sql = "insert into t_order value(0,?,?,?,?,0)";
        Integer id=super.executeUpdate(sql,
                order.getOrderNo(),
                order.getOrderDate(),
                order.getOrderUser().getId(),
                order.getOrderMoney()
        );
        order.setId(id);
    }
}
